-- card: 20943 from stack: in.1 -- bmap block id: 0 -- flags: 0000 -- background id: 13187 -- name: ReturnkeyInField -- part contents for background part 4 ----- text ----- 5 -- part contents for background part 2 ----- text ----- ReturnkeyInField -- part contents for background part 3 ----- text ----- -- --This will capture the return key when it is pressed in the active field. --Each line of code is explained directly beneath it. --Created 1/7/88 by Steve Drazga, ART Incorporated --This script segment may be put into the card, background, or stack scripts. --To make it work, the fields should pass the global variables --'currentfield', and 'nextfield' -- on idle -- global currentfield,nextfield -- --currentfield contains the name of the currently active field --next field contains the name of the field that the user will --go to when he presses the return key -- if currentfield is empty then exit idle -- --if the currentfield is empty then we don't want to do anything -- if last char of field currentfield is return then -- --if the user has pressed return then we will execute the following: -- delete last char of field currentfield -- --first we get rid of the return character -- put rect of field nextfield into it put item 1 of it into leftSide put item 2 of it into top -- --then we get the coordinates of the next field in line so that --we can select the entire contents. -- click at leftside,top+5 with shiftkey -- --we now select the contents of the next field -- end if pass idle -- --always pass the idle up through the hiearchy -- end idle